*************************************************************************
*																		*
*					Campaign Panel Book Master Chapter 5				*
*																		*
*************************************************************************	

cd "${path}\Reproducible Do-Files\"

clear mata
clear matrix
set more off
set scrollbufsize 2000000

***Run regressions for 2009 first
use "Data/ZA5305_en_v5-0-0.dta", clear

**Create turnout variable and dynamics turnout

do "${path}\Reproducible Do-Files\Chapter 5\mobilization09.do"

**Create attitude variables

do "${path}\Reproducible Do-Files\Chapter 5\attitudes09.do"

**Create cognitive involvement variables

do "${path}\Reproducible Do-Files\Chapter 5\koginvolv09.do"

**Create communication variables

do "${path}\Reproducible Do-Files\Chapter 5\komm_variablen09.do"

**Merge single datasets and transform them into long-format

do "${path}\Reproducible Do-Files\Chapter 5\longformat09.do"

**Run regressions

do "${path}\Reproducible Do-Files\Chapter 5\xtreg09.do"

**Description for realistic effects

do "${path}\Reproducible Do-Files\Chapter 5\descriptives for realistic effects 09.do"




***Now we run the regressions for 2013

use "${data}\ZA5704_en_v3-2-0.dta", clear


**Create turnout variable and dynamics turnout

do "${path}\Reproducible Do-Files\Chapter 5\mobilization13.do"

**Create attitude variables

do "${path}\Reproducible Do-Files\Chapter 5\attitudes13.do"

**Create cognitive involvement variables

do "${path}\Reproducible Do-Files\Chapter 5\koginvolv13.do"

**Create communication variables

do "${path}\Reproducible Do-Files\Chapter 5\komm_variablen13.do"

**Merge single datasets and transform them into long-format

do "${path}\Reproducible Do-Files\Chapter 5\longformat13.do"

**Run regressions

do "${path}\Reproducible Do-Files\Chapter 5\xtreg13.do"

**Description for realistic effects

do "${path}\Reproducible Do-Files\Chapter 5\descriptives for realistic effects 13.do"

